/*
 * @Author: hrg
 * @Date: 2024-01-27 17:00:56
 * @LastEditTime: 2024-01-27 17:28:49
 * @FilePath: \study_go\study08_gin\gin_demo_05\main\main.go
 * @Description:html模板渲染
 */
package main

import "github.com/gin-gonic/gin"

func main() {
	r := gin.New()
	r.LoadHTMLGlob("../web/src/*")
	r.GET("/index", indexFunc)
	r.Run(":9090")
}

func indexFunc(c *gin.Context) {
	c.HTML(200, "index.html", gin.H{
		"title": "我是测试",
		"ce":    "123456",
	})
}
